package extend;

/**
 * @author gaopeng
 * @date 2019/12/7 3:53 下午
 */
public class Minister {

    public static void main(String[] args) {
        int count = 10;
        for (int i = 0; i < count; i++) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    int num = 5;
                    for (int j = 0; j < num; j++) {
                        Emperor emperor = Emperor.getInstance();
                        emperor.say(Thread.currentThread().getName());
                    }
                }
            }).start();
        }
    }

}
